<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>	
<%@ include file="/commons/global.jsp"%>
<!DOCTYPE html>
<html>
<head>
<%@ include file="/commons/basejs.jsp"%>
<link rel="stylesheet" href="${staticPath}/static/build/css/app.css" media="all" />
<link rel="stylesheet" href="${staticPath}/static/build/css/themes/default.css" media="all"id="skin" kit-skin />
<script src="${staticPath}/static/layui/layui.js"></script>
<script src="${staticPath}/static/tools/main.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ZDREAM主页</title>
</head>
<body class="kit-theme">
	<div class="layui-layout layui-layout-admin kit-layout-admin">
		<div class="layui-header">		
<!--头部右侧列表-->	
		<ul class="layui-nav layui-layout-right kit-nav">	
			 <li class="layui-nav-item">
				    <a href="javascript:;"> <i class="fa fa-picture-o"></i> 皮肤</a> 	
					<dl class="layui-nav-child skin">
						<dd><a href="javascript:;" data-skin="default" style="color:#393D49;"><i class="layui-icon">&#xe658;</i> 默认</a></dd>	
						<dd><a href="javascript:;" data-skin="orange" style="color:#ff6700;"><i class="layui-icon">&#xe658;</i> 橘子橙</a></dd>
						<dd><a href="javascript:;" data-skin="green" style="color:#00a65a;"><i class="layui-icon">&#xe658;</i> 春天绿</a></dd>
						<dd><a href="javascript:;" data-skin="pink" style="color:#FA6086;"><i class="layui-icon">&#xe658;</i> 少女粉</a></dd>
						<dd><a href="javascript:;" data-skin="blue" style="color:#00c0ef;"><i class="layui-icon">&#xe658;</i> 天空蓝</a></dd>
						<dd><a href="javascript:;" data-skin="red" style="color:#dd4b39;"><i class="layui-icon">&#xe658;</i> 枫叶红</a></dd>
					</dl>
			   </li>
            <!--<img src="static/build/images/head.jpg" class="layui-nav-img">   -->
			 <li class="layui-nav-item">
				<a href="javascript:;"> <i class="fa fa-user-circle-o"></i> <shiro:principal/></a>
				<dl class="layui-nav-child">	
					<dd><a href="javascript:;"   onclick="dream_show('用户信息','user/detailUserPage','600','600')"> 
					    <span>个人信息</span>
					</a></dd>	
					<dd><a href="javascript:;"  onclick="dream_show('修改密码','user/changePwdPage','400','400')">
					    <span>修改密码</span>
					</a></dd>	
				</dl>
			</li>
			<li class="layui-nav-item" onclick="logout()">
				<a href="javascript:;">
					<i class="fa fa-sign-out" ></i>注销
				</a>		
			</li>
	  </ul>
	  
	  <!--头部左侧列表-->	
			<div class="layui-logo">ZDREAM-脚手架</div>
			<ul class="layui-nav layui-layout-left kit-nav">
				<li class="layui-nav-item"><a href="javascript:;">会员管理</a></li>
				<li class="layui-nav-item"><a href="javascript:;">博客管理</a></li>
			</ul>
	</div>
	
<!--左侧下拉列表  -->
	<div class="layui-side layui-bg-black kit-side">
		<div class="layui-side-scroll">
			<div class="kit-side-fold">
				<i class="fa fa-navicon"></i>
			</div>
			<!--   左侧导航区域（可配合layui已有的垂直导航）  -->   
			<ul id="menu" class="layui-nav layui-nav-tree" lay-filter="kitNavbar" kit-navbar>			
				<!-- <li class="layui-nav-item layui-nav-itemed">
				    <a class="" href="javascript:;"><i class="fa fa-plug" ></i><span> 基本元素</span></a>						
					<dl class="layui-nav-child">
						<dd><a href="javascript:;" data-url="form.html" data-id="1"
								kit-target  data-title="表格" data-icon="fa-user">
								<i class="layui-icon">&#xe6c6;</i><span> 表格</span>
							</a></dd>
						<dd><a href="javascript:;" data-url="form.html" data-icon="fa-user"
								data-title="表单" kit-target data-id='2'>
								<i class="fa fa-user" ></i><span> 表格</span>
						</a></dd>
						<dd><a href="javascript:;" data-url="nav.html" data-icon="&#xe628;"
								data-title="导航栏" kit-target data-id='3'><i class="layui-icon">&#xe628;</i><span> 表格</span>	
							</a></dd>
						<dd><a href="javascript:;" data-url="list4.html" data-icon="&#xe614;" 
								data-title="列表四" kit-target data-id='4'>
								<i class="layui-icon">&#xe614;</i><span> 表格</span>	
							</a></dd>
						<dd><a href="javascript:;" kit-target
								data-options="{url:'https://www.baidu.com',icon:'&#xe658;',title:'百度一下',id:'5'}">
								<i class="layui-icon">&#xe658;</i><span> 百度一下</span>
							</a></dd>
					</dl>
				</li>
				 -->
			</ul>
		</div>
	</div>
		
<!-- 右边主体部分区域 -->		
	<div class="layui-body" id="container">
		<!-- 内容主体区域 -->
		<div style="padding: 15px;">
			<i class="layui-icon layui-anim layui-anim-rotate layui-anim-loop">&#xe63e;</i>
			请稍等...
		</div>
	</div>
		
<!-- 底部固定区域 -->
	<div class="layui-footer">
		<a  target="_blank" class="kit-footer-color" href="javascript:;">由ZYONG倾心打造的一款简洁高效脚手架ZDREAM</a>
	</div>

</div>
	
<script type="text/javascript">

 $(function () {
 //初始化菜单
 leftTree();
 });
 
  /*左侧菜单  */
 function leftTree(){
    $.ajax({
		    type : 'post',
			url : basePath + '/resource/leftMenu',
			async : false,
			success : function(date){
				var json = eval(date);
				var html ='';
			    $.each(json, function(index, fat){ 
	                html +='<li class="layui-nav-item">';
	                html +='<a class="" href="javascript:;"><i class="layui-icon">'+fat.icon+'</i><span>'+ fat.name +'</span></a>';
	                html +='<dl class="layui-nav-child">';
	                $.each(fat.children, function(index, child){  
	                html +='<dd><a href="javascript:;" data-url="'+basePath+child.url+'" data-id="'+child.id+'"';
	                html +='kit-target  data-title="'+child.name+'" data-icon="fa-user">';
	                html +='<i class="layui-icon">'+child.icon+'</i><span>'+ child.name+'</span>';
	                html +='</a></dd>';
	                });    
	                html +='</d1></li>';  
	            }); 
	           // alert(html);
	             $("#menu").html(html);
			}
		  });
 }
 /*注销  */
  function logout () { 
      layer.confirm('是否退出?', function(index, layero){
		 $.ajax({
		    type : 'get',
			url : basePath + '/logout',
			success : function(date) {
		    layer.msg("成功退出");
		    location.reload();
			}
		  });
		  layer.close(index); 
    }); 
  }
  

         
</script>
</body>
</html>